package tree;

public class Node {

    private String value;

    /**
     * 左孩子
     */
    private Node leftNode;
    /**
     * 右孩子
     */
    private Node rightNode;


    private Node(String value) {
        this.leftNode = null;
        this.rightNode = null;
        this.value = value;
    }

    public static Node getInstance(String value) {
        return new Node(value);
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }


    public Node getLeftNode() {
        return leftNode;
    }

    public void setLeftNode(Node leftNode) {
        this.leftNode = leftNode;
    }

    public Node getRightNode() {
        return rightNode;
    }

    public void setRightNode(Node rightNode) {
        this.rightNode = rightNode;
    }
}
